<%@page import="classes.Group"%>
<%@page import="java.util.ArrayList"%>
<%@page import="classes.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome <%
	HttpSession s = request.getSession();
	User us = (User) s.getAttribute("user");
	out.println(us.getName());
%></title>
</head>
<body>
	<h1>
		Hi
		<%
		out.println(us.getName());
	%>
	</h1>
	<p>Subjects :</p>
	<%
		ArrayList<Group> arr = new ArrayList<Group>();
		arr = us.getSubjectsStudent();
		
		for (int i = 0; i < arr.size(); i++) {
			out.println("<a href=\"subject.jsp?group="+ i + " \" >  " + arr.get(i).getSubjectName() + " </a>");
		}
	%>

<p><a href="AccountSettings.jsp">Account Settings</a></p>
</body>
</html>